package com.cc.mall.feign;

import com.cc.common.utils.R;
import com.cc.user.entity.ScheduleEntity;
import com.cc.user.entity.UserEntity;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("cc-user")
public interface UserFeign {
    @GetMapping("/user/employeecustomer/getEidByCid/{cid}")
    public Long getEidByCid(@PathVariable("cid") Long cid);

    @GetMapping("/user/receiveaddress/info/{id}")
    public R info(@PathVariable("id") Long id);

    @GetMapping("/user/user/getUserByMobileOrNickname")
    public UserEntity getUserByMobileOrNickname(@ApiParam("手机号") @RequestParam(value = "mobile",required = false) String mobile,
                                                @ApiParam("用户名") @RequestParam(value = "nickname",required = false) String nickname);

    @PostMapping("/user/schedule/save")
    public R save(@RequestBody ScheduleEntity schedule);

    @GetMapping("/user/user/info/{uid}")
    public R getKehuInfo(@PathVariable("uid") Long uid);
}
